<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<title>找回密码-找回方式选择</title>
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/app.css">
		<link rel="stylesheet" href="../../css/ripple.css">
		<style>
			body{background: #f3f3f3;}
			.info{ float: left; width: 100%; background: #fff;overflow: hidden;}
			.mt15{ margin-top:0.5rem;}
			.mt16{ margin-top: .2rem;}
			.title_text{ width: 100%; margin-top:1.5rem; text-align: center; font-size: .34rem; color: #999;}
			.info ul{width: 100%;padding: 0 !important;margin: 0 !important;margin-top:0rem !important;}
			.info ul li{ float: left;font-size: 0.30rem;line-height:.95rem;width: 100%;height: 0.94rem;background: #fff;border-bottom: 1px solid #eeeeee; position: relative; padding-left: .1rem;box-sizing: border-box;}
			.info ul li a{ width:6rem ; display: inline-block;color: #414141; box-sizing: border-box;}
			.info ul a:after {right: 15px; content: '\e583';font-family: Muiicons;font-size: inherit;line-height: 1;position: absolute;top: 50%;display: inline-block;-webkit-transform: translateY(-50%);transform: translateY(-50%);text-decoration: none;color: #bbb;-webkit-font-smoothing: antialiased;}
			.encrypted_box:after {right: 15px; content: '\e583';font-family: Muiicons;font-size: inherit;line-height: 1;position: absolute;top: 50%;display: inline-block;-webkit-transform: translateY(-50%);transform: translateY(-50%);text-decoration: none;color: #bbb;-webkit-font-smoothing: antialiased;}
            .info>ul>li>span{ float: left; width:.6rem; display: inline-block;height: 0.94rem;}
			.icon1{background: url("../../images/menu/mibap.png") no-repeat center center; background-size:.28rem .28rem;}
			.icon2{background: url("../../images/menu/shouji.png") no-repeat center center; background-size:.28rem .28rem;}
			.icon3{background: url("../../images/menu/youxiang.png") no-repeat center center; background-size:.28rem .28rem;}
			.icon4{background: url("../../images/menu/email.png") no-repeat center center; background-size:.28rem .22rem;}
			.info ul a:last-child{border-bottom: none;}
			.info .icon{width: 0.58rem;height: 100%;background: #fff;position: absolute;top: 0;}
			.info .icon div{width: 0.32rem;height: 0.32rem;background-size: contain;position: absolute;left: 0.21rem;}
			/*.info ul a b{position: absolute;right: 0.35rem;color: #c7c7cc;}*/
			.info ul a .portrait{position: absolute;top: 0.07rem;right:0.68rem ;width: 0.78rem;height: 0.78rem;}
			.info ul a .btn{width: 1.1rem;height: 0.4rem;color: #999999;font-size: 0.24rem;position: absolute;top: 0.28rem;right:0.71rem;line-height: 0.4rem;text-align: center;}
			.info ul a span{position: absolute;right: 0.71rem;color: #999999;font-size: 0.26rem;}

			.mask{display: none;}
			.encrypted_box:after {right: 15px; content: '\e583';font-family: Muiicons;font-size: inherit;line-height: 1;position: absolute;top: 50%;display: inline-block;-webkit-transform: translateY(-50%);transform: translateY(-50%);text-decoration: none;color: #bbb;-webkit-font-smoothing: antialiased;}

			/*.submit{width: 6rem;height: 0.68rem;background: #117afd;font-size: 0.3rem;color: #fff;border: none;outline: none; margin-top: .5rem; border-radius: 0.1rem;}*/
		</style>
	</head>
	<body>
		<!--<div class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<a class="back">返回</a>
			<h1 class="mui-title">安全校检</h1>
		</div>-->
		<div class="title_text">
			您正在为账号<font id="userLogin"></font>找回密码<br />
			请选择以下任一种方式进行校检</div>
		<div class="info mt15">
			<ul>
				<li id="phone">
					<span class="icon2"></span>
					<a href="#">通过手机找回</a>
				</li>
				<li id="question">
					<span class="icon1"></span>
			    	<a href="#">通过密保问题找回</a>
				</li>
				<li id="email">
					<span class="icon3"></span>
				<a href="#">通过邮箱找回</a>
				</li>
			</ul>
		</div>
		
		<!--<button class="submit mui-btn mui-btn-primary ">下一步</button>-->
		
	</body>
	<script>
		function my_immersed(immersed){
			
		}
	</script>
	<script src="../../js/immersed.js"></script>
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/common.js"></script>
	<script src="../../js/app.js" ></script>
	<script>
		var loginUserName = null;
		mui.plusReady(function(){
			initInfo();
			loginUserName = utils.getUrlParam('loginUserName');
			if (loginUserName) {
				document.getElementById('userLogin').innerHTML = loginUserName;
			} else {
				mui.toast('参数异常，请返回重试');
			}
		})
		//通过账号获取信息
		function initInfo() {
			var quesA = localStorage.getItem('quesA');
			var quesB = localStorage.getItem('quesB');
			if (quesA != 'null' && quesB != 'null') {
				//密保问题找回
				document.getElementById('question').addEventListener('tap',function(){
					showTemplates('recoverByQues.html','通过密保问题找回','_www/src/login/recoverByQues.html?loginUserName='+loginUserName);
				})
			} else {
				document.getElementById('question').style.display = 'none';
			}
			var email = utils.getUrlParam('email');
			if (email) {
				//邮箱找回
				document.getElementById('email').addEventListener('tap',function(){
					utils.showWaiting();
					//发送邮箱验证码
					utils.ajax('appUserInfo/sendEmailCode.do',function(data){
						var data = JSON.parse(data);
						if(data.state == '1') {//成功
							var checkCode = data.code;
							var zdht = '0';
							if(data.zdht != undefined && data.zdht == '1'){
								zdht = '1';
							}
							showTemplates('recoverByEmail.html','通过邮箱找回','_www/src/login/recoverByEmail.html?loginUserName='+loginUserName+'&email='+email+'&checkCode='+checkCode+'&zdht='+zdht);
						} else {
							mui.toast(data.result);
						}
					},"email="+email,null,function(){
						mui.toast('抱歉，当前服务不可用，请稍后再试！');
					});
				})
			} else {
				document.getElementById('email').style.display = 'none';
			}
			var phone = utils.getUrlParam('phone');
			
			if (phone) {
				//手机找回
				document.getElementById('phone').addEventListener('tap',function(){
					utils.showWaiting();
					//发送验证码
					utils.ajax('appHttpService/appSendPhone.do',function(data){
						var data = JSON.parse(data);
						if(data.code == '0') {//成功
							var checkCode = data.result;
							var zdht = '1';
							if(data.zdht != undefined && data.zdht == '0'){
								zdht = '0';
							}
							showTemplates('recoverByPhone.html','通过手机找回','_www/src/login/recoverByPhone.html?loginUserName='+loginUserName+'&phone='+phone+'&checkCode='+checkCode+'&zdht='+zdht);
						} else {
							mui.toast(data.result);
						}
					},"netUserPhone="+phone,null,function(){
						mui.toast('抱歉，当前服务不可用，请稍后再试');
					});
				})
			} else {
				document.getElementById('phone').style.display = 'none';
			}
			
		}
		
	</script>
</html>